package cn.iocoder.yudao.module.call.dal.mysql.ivrflowvoice;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.call.dal.dataobject.ivrflowvoice.IvrFlowVoiceDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.call.controller.admin.ivrflowvoice.vo.*;

/**
 * ivr流程-语音文件 Mapper
 *
 * @author 数创万维
 */
@Mapper
public interface IvrFlowVoiceMapper extends BaseMapperX<IvrFlowVoiceDO> {

    default PageResult<IvrFlowVoiceDO> selectPage(IvrFlowVoicePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<IvrFlowVoiceDO>()
                .eqIfPresent(IvrFlowVoiceDO::getIvrFlowId, reqVO.getIvrFlowId())
                .eqIfPresent(IvrFlowVoiceDO::getAppointType, reqVO.getAppointType())
                .eqIfPresent(IvrFlowVoiceDO::getFilePath, reqVO.getFilePath())
                .eqIfPresent(IvrFlowVoiceDO::getType, reqVO.getType())
                .eqIfPresent(IvrFlowVoiceDO::getLocalPath, reqVO.getLocalPath())
                .eqIfPresent(IvrFlowVoiceDO::getContent, reqVO.getContent())
                .betweenIfPresent(IvrFlowVoiceDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(IvrFlowVoiceDO::getId));
    }

}